# coding=utf-8
"""
# Author : Hunter Oakley
# Time   : 2022/6/7 22:57
# Descripation:md5加密
"""
import hashlib
from django.conf import settings


def md5(data_string):
    """
    md5加密
    """
    obj = hashlib.md5(settings.SECRET_KEY.encode("utf-8"))
    obj.update(data_string.encode("utf-8"))
    return obj.hexdigest()
